package entities

import (
	"time"
)

type SwimmerUWBTerminalRecord struct {
	Id             string    `gorm:"column:record_id;primaryKey" json:"id"`
	SwimmerID      string    `gorm:"column:swimmer_id;not null" json:"swimmer_id"`
	X              float64   `gorm:"column:x;not null" json:"x"`
	Y              float64   `gorm:"column:y;not null" json:"y"`
	Z              float64   `gorm:"column:z;not null" json:"z"`
	CreateDatetime time.Time `gorm:"column:create_datetime;not null" json:"create_datetime"` // 实际上也是取到该数据的日期时间。
	ModifyDatetime time.Time `gorm:"column:modify_datetime;not null" json:"modify_datetime"`
	Creator        string    `gorm:"column:creator;not null" json:"creator"`
	Modifier       string    `gorm:"column:modifier;not null" json:"modifier"`
	Mileage        float64   `gorm:"column:mileage;not null" json:"mileage"`
	InFence        bool      `gorm:"column:in_fence" json:"in_fence"`
}

func (SwimmerUWBTerminalRecord) TableName() string {
	return "swimmer_uwb_terminal_records"
}

type SwimmerUWBTerminalReport struct {
	TotalMileage   float64 `json:"total_mileage"`
	Minutes        float64 `json:"minutes"`
	AverageMileage float64 `json:"average_mileage"`
}
